{% extends "base.volt" %}
    {% block pageHeader %}

    <style>
        .checkbox-inline+.checkbox-inline{ margin-right: 10px;margin-left: 0;}
    </style>

    {% endblock %}

    {% block pageFooter%}
        <script type="text/javascript">
            var domainPic = '{{ this.di.get('appConfig').application.domainPic }}';
            var picUploadUrl = '{{ url.get('tools/editorPTUploadImg', ['callback':'parent.setFormResultImg', 'type':'banner']) }}';
        </script>
        {{ javascript_include("/libs/UEditor/utf8-php/ueditor.config.js", false) }}
    	{{ javascript_include("/libs/UEditor/utf8-php/ueditor.all.min.js", false) }}
    	{{ javascript_include("/libs/UEditor/utf8-php/lang/zh-cn/zh-cn.js", false) }}
        {{ javascript_include("/assets/manage/js/om/bannerAdd.js", false) }}
    {% endblock %}

{% block content %}
    {{ partial("module/left_om") }}
    <div class="col-xs-10">
        <ol class="breadcrumb">
            <li>Banner位管理</li>
            <li class="active">添加Banner</li>
        </ol>
	
            <form id="form_add" durl="{{url.get('om/bannerList')}}"  class="form-horizontal" role="form" method="post" action="" target="ifr_send_file" enctype="multipart/form-data">
            <input type="hidden" name="callback" value="parent.setFormResult">
            
            <div class="form-group">
            			<label for="city" class="col-xs-2 control-label">城市</label>
            			<div class="col-xs-9">
                            <label class="checkbox-inline">
                            <input type="checkbox" name="city[]" id="cityAll" value="0" data-rule="checked;"> 全国
                            </label>
                            {% for oc in openCity %}
                                <label class="checkbox-inline">
                                <input type="checkbox" name="city[]" id="city" value="{{ oc.city_id }}"> {{ oc.city_name|e }}
                                </label>
                            {% endfor %}
            			</div>
        			</div>
            
            <div class="form-group">
                <label for="banner_name" class="col-xs-2 control-label">类型</label>
                <div class="col-xs-9">
                			<div class="checkbox">
                        		<select class="form-control item_link_type" name="banner_name" id="banner_name">
                                    <option value="1">首页</option>
                                    <option value="2">问答</option>
                                    <option value="3">美容院</option>
                                </select>
                			</div>
            			</div>
            </div>
            
            <div class="form-group">
                <label for="banner_cover" class="col-xs-2 control-label">封面</label>
                <div class="col-xs-9">                 
                    <input type="file" class="form-control" id="banner_cover" name="banner_cover" data-rule="required;">
                    <p id="imgInfo" class="help-block">*支持JPG，PNG，JPEG格式的图片，大小不超过1M，尺寸为：<em>750X350</em>px</p>                    
                </div>
            </div>
            <div class="form-group">
                            <label for="handle_type" class="col-xs-2 control-label">处理类型</label>
                            <div class="col-xs-3">
                                <select class="form-control item_link_type" name="handle_type" id="linkType">
                                    <!-- <option value="">请选择...</option> -->
                                    <option value="none">不跳转</option>
                                    <option value="info">内容详情</option>
                                    <option value="url">内部打开网页</option>
                                    <option value="activity">跳转到活动详情</option>
                                    <option value="question">跳转到问答详情</option>
                                    <option value="beautyParlor">跳转到美容院详情</option>
                                    <option value="beautyCanon">跳转到宝典详情</option>
                                    <option value="beautyParlorService">跳转到服务项目详情</option>
                                </select>
                            </div>
                        </div>
            
            <div class="form-group handle1">
                <label for="handle_data" class="col-xs-2 control-label">处理数据</label>
                <div class="col-xs-9">
                    <input id="linkData" type="text" class="form-control item_link_data" placeholder="" value="" name="handle_data">
                </div>
           </div>
           <div class="form-group handle2">
                <label for="handle_data" class="col-xs-2 control-label">内容详情</label>
                <div class="col-xs-9">
                    <textarea id="editor" name="handle_info" rows="15" style="height:300px;" data-rule="" ></textarea>
                </div>
           </div>
           <div class="form-group">
                <div class="col-xs-12 text-center">
                    <button id="btn_save" type="submit" class="btn btn-primary"><i class="fa fa-floppy-o fa-lg"></i> 保 存</button>
                </div>
            </div>             
            
            
        </form>
{% endblock %}